import java.awt.BorderLayout;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;

public class GInfoPopUp
    extends JFrame
{

    private JPanel contentPane;
    private JPanel contentPanel;
    private JPanel buttonPanel;
    private JButton buttonClose;
    private JLabel labelName;
    private JLabel labelVersion;
    private JLabel labelDate;
    private JLabel labelDeveloper;
    private JLabel labelContact;
    private JLabel labelNameContent;
    private JLabel labelVersionContent;
    private JLabel labelDateContent;
    private JLabel labelDeveloperContent;
    private JLabel labelContactContent;

    /**
     * Create the frame.
     */
    public GInfoPopUp()
    {
        initGUI();
    } // End of constructor

    // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    /**
     * Creates the User Interface
     */
    // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    public void initGUI()
    {
        setResizable( false );
        setIconImage( Toolkit.getDefaultToolkit().getImage( GInfoPopUp.class.getResource( "/Icons/Help16x16.png" ) ) );
        setTitle( "Information" );
        setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        setBounds( 100, 100, 278, 185 );
        contentPane = new JPanel();
        contentPane.setBorder( new EmptyBorder( 5, 5, 5, 5 ) );
        contentPane.setLayout( new BorderLayout( 0, 0 ) );
        setContentPane( contentPane );

        contentPanel = new JPanel();
        contentPanel.setBorder( new TitledBorder( null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null ) );
        contentPane.add( contentPanel, BorderLayout.CENTER );
        GridBagLayout gbl_contentPanel = new GridBagLayout();
        gbl_contentPanel.columnWidths = new int[] { 0, 152, 244, 0 };
        gbl_contentPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0 };
        gbl_contentPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
        gbl_contentPanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
        contentPanel.setLayout( gbl_contentPanel );

        labelName = new JLabel( CLanguage.getString( "GInfoPopUp.8" ) );
        labelName.setFont( new Font( "Tahoma", Font.BOLD, 11 ) );
        GridBagConstraints gbc_labelName = new GridBagConstraints();
        gbc_labelName.fill = GridBagConstraints.BOTH;
        gbc_labelName.insets = new Insets( 0, 0, 5, 5 );
        gbc_labelName.gridx = 1;
        gbc_labelName.gridy = 0;
        contentPanel.add( labelName, gbc_labelName );

        labelNameContent = new JLabel( CLanguage.getString( "GInfoPopUp.0" ) );
        GridBagConstraints gbc_labelNameContent = new GridBagConstraints();
        gbc_labelNameContent.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelNameContent.insets = new Insets( 0, 0, 5, 0 );
        gbc_labelNameContent.gridx = 2;
        gbc_labelNameContent.gridy = 0;
        contentPanel.add( labelNameContent, gbc_labelNameContent );

        labelVersion = new JLabel( CLanguage.getString( "GInfoPopUp.10" ) );
        labelVersion.setFont( new Font( "Tahoma", Font.BOLD, 11 ) );
        GridBagConstraints gbc_labelVersion = new GridBagConstraints();
        gbc_labelVersion.insets = new Insets( 0, 0, 5, 5 );
        gbc_labelVersion.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelVersion.gridx = 1;
        gbc_labelVersion.gridy = 1;
        contentPanel.add( labelVersion, gbc_labelVersion );

        labelVersionContent = new JLabel( CLanguage.getString( "GInfoPopUp.1" ) );
        GridBagConstraints gbc_labelVersionContent = new GridBagConstraints();
        gbc_labelVersionContent.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelVersionContent.insets = new Insets( 0, 0, 5, 0 );
        gbc_labelVersionContent.gridx = 2;
        gbc_labelVersionContent.gridy = 1;
        contentPanel.add( labelVersionContent, gbc_labelVersionContent );

        labelDate = new JLabel( CLanguage.getString( "GInfoPopUp.12" ) );
        labelDate.setFont( new Font( "Tahoma", Font.BOLD, 11 ) );
        GridBagConstraints gbc_labelDate = new GridBagConstraints();
        gbc_labelDate.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelDate.insets = new Insets( 0, 0, 5, 5 );
        gbc_labelDate.gridx = 1;
        gbc_labelDate.gridy = 2;
        contentPanel.add( labelDate, gbc_labelDate );

        labelDateContent = new JLabel( CLanguage.getString( "GInfoPopUp.2" ) );
        GridBagConstraints gbc_labelDateContent = new GridBagConstraints();
        gbc_labelDateContent.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelDateContent.insets = new Insets( 0, 0, 5, 0 );
        gbc_labelDateContent.gridx = 2;
        gbc_labelDateContent.gridy = 2;
        contentPanel.add( labelDateContent, gbc_labelDateContent );

        labelDeveloper = new JLabel( CLanguage.getString( "GInfoPopUp.14" ) );
        labelDeveloper.setFont( new Font( "Tahoma", Font.BOLD, 11 ) );
        GridBagConstraints gbc_labelDeveloper = new GridBagConstraints();
        gbc_labelDeveloper.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelDeveloper.insets = new Insets( 0, 0, 5, 5 );
        gbc_labelDeveloper.gridx = 1;
        gbc_labelDeveloper.gridy = 3;
        contentPanel.add( labelDeveloper, gbc_labelDeveloper );

        labelDeveloperContent = new JLabel( CLanguage.getString( "GInfoPopUp.3" ) );
        GridBagConstraints gbc_labelDeveloperContent = new GridBagConstraints();
        gbc_labelDeveloperContent.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelDeveloperContent.insets = new Insets( 0, 0, 5, 0 );
        gbc_labelDeveloperContent.gridx = 2;
        gbc_labelDeveloperContent.gridy = 3;
        contentPanel.add( labelDeveloperContent, gbc_labelDeveloperContent );

        labelContact = new JLabel( CLanguage.getString( "GInfoPopUp.16" ) );
        labelContact.setFont( new Font( "Tahoma", Font.BOLD, 11 ) );
        GridBagConstraints gbc_labelContact = new GridBagConstraints();
        gbc_labelContact.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelContact.insets = new Insets( 0, 0, 0, 5 );
        gbc_labelContact.gridx = 1;
        gbc_labelContact.gridy = 4;
        contentPanel.add( labelContact, gbc_labelContact );

        labelContactContent = new JLabel( CLanguage.getString( "GInfoPopUp.4" ) );
        GridBagConstraints gbc_labelContactContent = new GridBagConstraints();
        gbc_labelContactContent.fill = GridBagConstraints.HORIZONTAL;
        gbc_labelContactContent.gridx = 2;
        gbc_labelContactContent.gridy = 4;
        contentPanel.add( labelContactContent, gbc_labelContactContent );

        buttonPanel = new JPanel();
        buttonPanel.setBorder( new TitledBorder( null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null ) );
        contentPane.add( buttonPanel, BorderLayout.SOUTH );
        GridBagLayout gbl_buttonPanel = new GridBagLayout();
        gbl_buttonPanel.columnWidths = new int[] { 134, 0, 0, 0, 0, 0, 0, 0, 0 };
        gbl_buttonPanel.rowHeights = new int[] { 23, 0 };
        gbl_buttonPanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE };
        gbl_buttonPanel.rowWeights = new double[] { 1.0, Double.MIN_VALUE };
        buttonPanel.setLayout( gbl_buttonPanel );

        buttonClose = new JButton( CLanguage.getString( "GInfoPopUp.19" ) );
        buttonClose.addActionListener( new ActionListener()
        {
            public void actionPerformed( ActionEvent e )
            {
                closeWindow();
            }
        } );
        buttonClose.setIcon( new ImageIcon( GInfoPopUp.class.getResource( "/Icons/close22x22.png" ) ) );
        GridBagConstraints gbc_buttonClose = new GridBagConstraints();
        gbc_buttonClose.insets = new Insets( 0, 0, 0, 5 );
        gbc_buttonClose.fill = GridBagConstraints.HORIZONTAL;
        gbc_buttonClose.gridx = 4;
        gbc_buttonClose.gridy = 0;
        buttonPanel.add( buttonClose, gbc_buttonClose );
    }

    // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    /**
     * Closes this window by setting it invisible
     */
    // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    private void closeWindow()
    {
        contentPanel.getParent().getParent().getParent().getParent().setVisible( false );
    }

} // End of class
